import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Reg from '../views/reg.vue'
import Login from '../views/login.vue'
import Search_tz from '../views/search_tz.vue'
import List from '../views/list.vue'
import Dis from '../views/dis.vue'
import Detail from '../views/detail.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home,
    // 首页
  },{
    // 跳转首页
    path: '/home',
    name: 'home',
    component: Home
},
  {
    path: '/login',
    name: 'login',
    component: Login,
    // 登录页
  },
  {
    path: '/reg',
    name: 'reg',
    component: Reg,
    // 注册页
  },
  {
    path: '/tz',
    name: 'tz',
    component: Search_tz,
    // 首页  搜索跳转
  },
  {
    path: '/list',
    name: 'list',
    component: List,
    // 列表跳转
  },{
    path: '/dis',
    name: 'dis',
    component: Dis,
    // 二级主页
  },,{
    path: '/detail',
    name: 'detail',
    component: Detail,
    // 二级列表页
  },
]

const router = new VueRouter({
  routes
})

export default router
